/** @format */

import type {RouteRecordRaw} from 'vue-router';
import basic from './basic';
import study from './study';

export const rootRoute: RouteRecordRaw = {
    path: '/',
    name: 'Layout',
    redirect: '/home',
    component: () => import('@/layouts/index.vue'),
    meta: {
        title: '根路由',
    },
    children: [
        {
            path: '/home',
            component: () => import('@/views/home/index.vue'),
        },
        {
            path: '/study',
            children: [...study],
        },
    ],
};

export const basicRoutes: Array<RouteRecordRaw> = [
    rootRoute,
    // 主布局之外的路由，比如登录
    // ...outsideLayout,
    // 基础路由
    ...basic,
];
